/*
 * 作者：姚俊
 * 功能：随机生不同位数的随机数
 */
package tools;

import java.util.Random;

public class RandomCreateNum {
	
	
	public static int createNum(int a)
	{
		 int max=(int)Math.pow(10,a)-1;
	     int min=0;
	     Random random = new Random();
	     int s = random.nextInt(max)%(max-min+1) + min;
	     return s;
	}
	
	
	public static int createNum(int min,int max)
	{
		Random random = new Random();
		int s = random.nextInt(max)%(max-min+1) + min;
		return s;
	}
	

	
}
